//
//  YanSeModel.m
//  一键联IOS
//
//  Created by xufei on 15/12/22.
//  Copyright © 2015年 xufei. All rights reserved.
//

#import "YanSeModel.h"

@implementation YanSeModel
+(YanSeModel *)parseWithDictionary:(NSDictionary *)dict{
    YanSeModel *yanse = [[YanSeModel alloc] init];
    
    yanse.yanSe = dict[@"attrValueName"];
    yanse.yanSeID = [dict[@"attrValueId"] intValue];
    
    
    yanse.chiMaArray = [NSMutableArray array];
    NSArray *chi = dict[@"childrenAttr"];
    for (NSDictionary *chiDict in chi) {
        ChiCun *chima = [ChiCun parse:chiDict];
        [yanse.chiMaArray addObject:chima];
    }
    
    return yanse;
}
@end
